/*
 * Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD.
 * All rights reserved.
 * Official Web Site: http://www.xiaominfo.com.
 * Developer Web Site: http://open.xiaominfo.com.
 */

package com.github.xiaoymin.map.spring.properties;

import cn.hutool.core.util.StrUtil;
import com.github.xiaoymin.map.model.AmapKey;

/**
 * @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
 * 2020/09/23 16:07
 * @since:map-client 1.0
 */
public class MapClientAmapKeyProperty {
    /**
     * 开发秘钥
     */
    private String key;
    /**
     * 签名秘钥
     */
    private String sign;

    public AmapKey toAmapKey(){
        boolean signFlag=true;
        if (StrUtil.isBlank(sign)){
            signFlag=false;
        }
        return new AmapKey(key,signFlag,sign);
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }
}
